package com.aaa.three.controller;

import com.aaa.three.aop.Log;
import com.aaa.three.entity.ScheduleVo;
import com.aaa.three.pojo.query.DoctorQuery;
import com.aaa.three.result.AjaxResult;
import com.aaa.three.service.ScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @PACKAGE_NAME: com.aaa.three.controller
 * @NAME: Schedule
 * @USER: Tprairie
 * @DATE: 2022/1/13
 * @PROJECT_NAME: three
 * 排班操作
 */
@RestController
@RequestMapping("/sch")
public class ScheduleController {
    @Autowired
    private ScheduleService scheduleServiceImpl;
    @RequestMapping("/list")
    public AjaxResult list(DoctorQuery doctorQuery){
        return scheduleServiceImpl.listAll(doctorQuery);
    }
    @RequestMapping("/adddate")
    public AjaxResult addDate(){
        return scheduleServiceImpl.addDate();
    }
    @RequestMapping("/add")
    @Log("添加排班")
    public AjaxResult addSchedule(ScheduleVo scheduleVo){
        return scheduleServiceImpl.addSchedule(scheduleVo);
    }
    @RequestMapping("/getdeletedate")
    public AjaxResult getDeleteDate(){
        return scheduleServiceImpl.getDeleteDate();
    }
    @RequestMapping("/delete")
    @Log("取消排班")
    public AjaxResult deleteSchedule(ScheduleVo scheduleVo){
        return scheduleServiceImpl.deleteSchedule(scheduleVo);
    }
    @RequestMapping("/getSch")
    public AjaxResult getSchedule(){
        return scheduleServiceImpl.getSchedule();
    }
    @RequestMapping("/getnumber")
    public AjaxResult getNumber(ScheduleVo scheduleVo){
        return scheduleServiceImpl.getNumber(scheduleVo);
    }
    @RequestMapping("/updateSch")
    @Log("修改排班")
    public AjaxResult updateSchedule(ScheduleVo scheduleVo){
        return scheduleServiceImpl.updateSchedule(scheduleVo);
    }
}
